package com.infosys.setl.fp.demo4;

import org.apache.commons.functor.BinaryPredicate;
import org.apache.commons.functor.UnaryPredicate;

import com.infosys.setl.fp.demo1.SetlItem;

public class BinaryPredicateUnaryPredicate implements UnaryPredicate<SetlItem> {
    private BinaryPredicate<SetlItem, SetlItem> binaryPredicate;

    public BinaryPredicateUnaryPredicate(BinaryPredicate<SetlItem, SetlItem> prd) {
        binaryPredicate = prd;
    }

    public boolean test(SetlItem obj) {
        return binaryPredicate.test(obj, obj);
    }
}
